package com.slz3.business.module.memberManagement.memShoppingCar.steward;

import com.slz3.business.module.memberManagement.memShoppingCar.domain.MemShoppingCar;
import com.slz3.business.module.memberManagement.memShoppingCar.domain.MemShoppingCarCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemShoppingCarResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MemShoppingCar.class).flatMap(memShoppingCar ->
                MemShoppingCarResController.add(req, memShoppingCar)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MemShoppingCarCondition.class).flatMap(memShoppingCarCondition ->
                MemShoppingCarResController.delete(req, memShoppingCarCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MemShoppingCar.class).flatMap(memShoppingCar ->
                MemShoppingCarResController.modify(req, memShoppingCar)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MemShoppingCarResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MemShoppingCarResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MemShoppingCarResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MemShoppingCarCondition.class).flatMap(memShoppingCarCondition ->
                MemShoppingCarResController.auditSubmit(req, memShoppingCarCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MemShoppingCarCondition.class).flatMap(memShoppingCarCondition ->
                MemShoppingCarResController.audit(req, memShoppingCarCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MemShoppingCarCondition.class).flatMap(memShoppingCarCondition ->
                MemShoppingCarResController.auditReject(req, memShoppingCarCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MemShoppingCarCondition.class).flatMap(memShoppingCarCondition ->
                MemShoppingCarResController.usingEnable(req, memShoppingCarCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MemShoppingCarCondition.class).flatMap(memShoppingCarCondition ->
                MemShoppingCarResController.usingDisable(req, memShoppingCarCondition)
        );
    }   

}
